-
Notifications
You must be signed in to change notification settings - Fork 871
DC-5245 Cloudflare Worker Guide #7301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdds a new MDX guide for using Prisma with PostgreSQL in Cloudflare Workers, registers the guide in the site sidebar, and updates the Lychee link-checker workflow to exclude a specific domain. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (9)📓 Common learnings📚 Learning: 2025-10-08T16:23:00.388ZApplied to files:
📚 Learning: 2025-10-08T16:23:00.388ZApplied to files:
📚 Learning: 2025-10-08T16:22:57.129ZApplied to files:
📚 Learning: 2025-11-20T21:00:02.521ZApplied to files:
📚 Learning: 2025-10-03T19:30:57.554ZApplied to files:
📚 Learning: 2025-10-10T13:13:30.534ZApplied to files:
📚 Learning: 2025-10-14T11:41:08.844ZApplied to files:
📚 Learning: 2025-10-08T16:24:58.382ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
Comment |
Dangerous URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
Deploying docs with
|
| Latest commit: |
b39bff1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e7162b83.docs-51g.pages.dev |
| Branch Preview URL: | https://dc-5245-cf-worker-guide.docs-51g.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
content/800-guides/410-cloudflare-workers.mdx(1 hunks)sidebars.ts(5 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Check internal links
- GitHub Check: Cloudflare Pages
🔇 Additional comments (6)
sidebars.ts (1)
379-379: LGTM!The new guide entry is properly registered in the Development Tools section and will be sorted alphabetically with the other guides.
content/800-guides/410-cloudflare-workers.mdx (5)
1-15: LGTM!The frontmatter and introduction are well-structured with appropriate metadata and a clear overview of the guide's purpose.
109-132: LGTM!The Prisma schema is correctly configured with the
cloudflareruntime and includes an appropriate User model for the tutorial.
171-363: LGTM!The implementation correctly demonstrates per-request Prisma Client initialization for Cloudflare Workers, which is the appropriate pattern for edge environments. The incremental code examples make it easy to follow.
365-438: LGTM!The testing, deployment, and next steps sections are well-written with clear instructions and helpful links to related documentation.
140-151: Fix inconsistent indentation.Line 145 uses tab characters while the surrounding lines use spaces. This creates inconsistent formatting in the example code.
Apply this diff to use consistent spacing:
"scripts": { //add-start "migrate": "prisma migrate dev", - "generate": "prisma generate", - "studio": "prisma studio" + "generate": "prisma generate", + "studio": "prisma studio" //add-end // ... existing scripts }⛔ Skipped due to learnings
Learnt from: aidankmcalister Repo: prisma/docs PR: 7165 File: content/800-guides/550-test-guide.mdx:85-90 Timestamp: 2025-10-08T16:23:00.388Z Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.Learnt from: aidankmcalister Repo: prisma/docs PR: 7165 File: content/800-guides/550-test-guide.mdx:50-66 Timestamp: 2025-10-08T16:22:57.129Z Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 800-guides/320-permit-io-access-control.mdx
Errors in 800-guides/410-cloudflare-workers.mdx
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
content/800-guides/410-cloudflare-workers.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-11-20T21:00:02.521Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.521Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-03T19:30:57.554Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7157
File: content/800-guides/400-deno-integration.mdx:188-190
Timestamp: 2025-10-03T19:30:57.554Z
Learning: For the prisma/docs repository, do not suggest changes to code blocks when reviewing documentation pull requests.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-10T13:13:30.534Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-85
Timestamp: 2025-10-10T13:13:30.534Z
Learning: Do not review or comment on files in the `ai/prompts/` directory or matching the path pattern `content/900-ai/prompts/` in the prisma/docs repository.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-14T11:41:08.844Z
Learnt from: carlagn
Repo: prisma/docs PR: 7183
File: content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx:561-567
Timestamp: 2025-10-14T11:41:08.844Z
Learning: Ignore the file `content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx` in future reviews as per user request. Issues in this file were addressed in PR #7185.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:24:58.382Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:168-176
Timestamp: 2025-10-08T16:24:58.382Z
Learning: For .mdx documentation files specifically, once a suggestion is resolved without implementation, never re-suggest that same change again. Respect the team's judgment that the resolution represents a final decision.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Check internal links
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
content/800-guides/410-cloudflare-workers.mdx (1)
1-418: Excellent documentation structure and content coverage.The guide is well-organized, progressively builds complexity, and clearly explains each step from project setup through deployment. The integration of Prisma with Cloudflare Workers is presented in a logical sequence with appropriate code examples and context. The warning about per-request client instantiation (lines 262–266) is a particularly valuable callout for edge environments.
🍈 Lychee Link Check Report
📊 Results Overview
Errors per inputErrors in 200-orm/500-reference/100-prisma-schema-reference.mdx
Errors in 800-guides/410-cloudflare-workers.mdx
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/lychee.yml(1 hunks)content/800-guides/410-cloudflare-workers.mdx(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: Only flag code snippets for (1) exposed secrets with real-looking values that should be placeholders (e.g., API keys, database passwords, AWS credentials), or (2) blatant syntax errors like missing parentheses, brackets, braces, or mismatched delimiters. Do not flag code quality issues, anti-patterns, security vulnerabilities, missing error handling, unused variables, or any other bad practices, as documentation intentionally shows problematic code.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:23:00.388Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:85-90
Timestamp: 2025-10-08T16:23:00.388Z
Learning: For .mdx files in the prisma/docs repository: All headings and titles should use sentence case (e.g., "Getting started with Prisma ORM", "Best practices for authentication"), not title case. Exception: Always preserve exact casing for product names including "Prisma Postgres", "Prisma", "Prisma ORM", and "Prisma Data Platform".
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-11-20T21:00:02.521Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7301
File: content/800-guides/410-cloudflare-workers.mdx:87-107
Timestamp: 2025-11-20T21:00:02.521Z
Learning: Do not suggest changes to `prisma.config.ts` files in the prisma/docs repository, as the code examples are intentional for documentation purposes.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:22:57.129Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:50-66
Timestamp: 2025-10-08T16:22:57.129Z
Learning: In `.mdx` files, do NOT flag or suggest changes for the following code quality issues even if they represent poor practices: React anti-patterns (using var instead of useState, direct DOM manipulation), missing keys in .map() iterations, non-serializable props in getServerSideProps, unused variables, missing error handling, SQL injection vulnerabilities (unless actively showing how to fix them), insecure cookie settings, missing TypeScript types, PrismaClient instantiation patterns, or any other code quality, security, or performance issues. Documentation code snippets are copied from source code and often intentionally show "before" examples or common mistakes.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-03T19:30:57.554Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7157
File: content/800-guides/400-deno-integration.mdx:188-190
Timestamp: 2025-10-03T19:30:57.554Z
Learning: For the prisma/docs repository, do not suggest changes to code blocks when reviewing documentation pull requests.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-10T13:13:30.534Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7167
File: content/900-ai/prompts/astro.mdx:84-85
Timestamp: 2025-10-10T13:13:30.534Z
Learning: Do not review or comment on files in the `ai/prompts/` directory or matching the path pattern `content/900-ai/prompts/` in the prisma/docs repository.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-14T11:41:08.844Z
Learnt from: carlagn
Repo: prisma/docs PR: 7183
File: content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx:561-567
Timestamp: 2025-10-14T11:41:08.844Z
Learning: Ignore the file `content/200-orm/800-more/600-help-and-troubleshooting/050-dataguide/050-database-glossary.mdx` in future reviews as per user request. Issues in this file were addressed in PR #7185.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
📚 Learning: 2025-10-08T16:24:58.382Z
Learnt from: aidankmcalister
Repo: prisma/docs PR: 7165
File: content/800-guides/550-test-guide.mdx:168-176
Timestamp: 2025-10-08T16:24:58.382Z
Learning: For .mdx documentation files specifically, once a suggestion is resolved without implementation, never re-suggest that same change again. Respect the team's judgment that the resolution represents a final decision.
Applied to files:
content/800-guides/410-cloudflare-workers.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (1)
.github/workflows/lychee.yml (1)
36-36: LGTM!The new exclusion pattern follows the established formatting and is placed logically with the other URL exclusions.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.